﻿namespace QLPhongKham
{
    using ConfigDatabase.Class;
    using ConfigDatabase.Forms;
    using DevExpress.LookAndFeel;
    using DevExpress.Utils;
    using DevExpress.XtraBars;
    using DevExpress.XtraBars.Helpers;
    using DevExpress.XtraBars.Ribbon;
    using DevExpress.XtraEditors;
    using DevExpress.XtraEditors.Controls;
    using DevExpress.XtraNavBar;
    using DevExpress.XtraReports.UI;
    using DevExpress.XtraTab;
    using DevExpress.XtraTab.ViewInfo;
    using Licens;
    using QLPhongKham.Access;
    using QLPhongKham.Access.VienPhi;
    using QLPhongKham.BaseClass.Chung;
    using QLPhongKham.UC;
    using System;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Windows.Forms;

    public class frmMain : RibbonForm
    {
        private ConnectDatabase _condata;
        private int _iUserID = 0;
        private ApplicationMenu appMenu;
        private BarButtonItem barButtonItem1;
        private BarButtonItem barButtonItem2;
        private BarButtonItem barButtonItem3;
        private BarButtonItem bbidangxuat;
        private BarButtonItem bbidesignReport;
        private BarStaticItem bsitennguoidung;
        private ButtonEdit buttonEdit;
        private NavBarItem calendarItem;
        private IContainer components = null;
        private NavBarItem draftsItem;
        private RibbonPageGroup exitRibbonPageGroup;
        private RibbonPageGroup grM00_01;
        private RibbonPageGroup grM00_02;
        private RibbonPageGroup grM00_03;
        private RibbonPageGroup grM00_04;
        private RibbonPageGroup grM01_01;
        private RibbonPageGroup grM01_02;
        private RibbonPageGroup grM01_03;
        private RibbonPageGroup grM01_04;
        private RibbonPageGroup grM02_01;
        private RibbonPageGroup grM02_02;
        private RibbonPageGroup grM02_03;
        private RibbonPageGroup grM03_01;
        private RibbonPageGroup grM03_02;
        private RibbonPageGroup grM03_03;
        private RibbonPageGroup grM03_04;
        private BarButtonItem iAbout;
        private BarButtonItem iExit;
        private NavBarItem inboxItem;
        private RibbonPage M00;
        private BarButtonItem M00_01;
        private BarButtonItem M00_02;
        private BarButtonItem M00_03;
        private BarButtonItem M00_04;
        private RibbonPage M01;
        private BarButtonItem M01_01_01;
        private NavBarItem M01_01_01_;
        private BarButtonItem M01_01_02;
        private NavBarItem M01_01_02_;
        private BarSubItem M01_02;
        private BarButtonItem M01_02_01;
        private BarSubItem M01_03_01;
        private BarButtonItem M01_03_01_01;
        private BarButtonItem M01_03_01_02;
        private BarButtonItem M01_03_01_03;
        private BarSubItem M01_03_02;
        private BarButtonItem M01_03_02_01;
        private BarButtonItem M01_03_02_02;
        private BarButtonItem M01_03_02_03;
        private BarButtonItem M01_03_03;
        private BarSubItem M01_04;
        private BarButtonItem M01_04_01;
        private RibbonPage M02;
        private BarButtonItem M02_01_01;
        private BarButtonItem M02_01_02;
        private BarSubItem M02_02;
        private BarButtonItem M02_02_01;
        private BarSubItem M02_03_01;
        private BarButtonItem M02_03_01_01;
        private BarButtonItem M02_03_01_03;
        private BarButtonItem M02_03_02;
        private RibbonPage M03;
        private BarButtonItem M03_01_01;
        private BarButtonItem M03_01_02;
        private BarButtonItem M03_01_03;
        private BarButtonItem M03_02_01;
        private BarButtonItem M03_02_02;
        private BarButtonItem M03_02_03;
        private BarSubItem M03_03;
        private BarButtonItem M03_03_01;
        private BarButtonItem M03_03_02;
        private BarButtonItem M03_03_03;
        private BarButtonItem M03_03_04;
        private BarSubItem M03_04_01;
        private BarButtonItem M03_04_01_01;
        private BarButtonItem M03_04_01_02;
        private BarButtonItem M03_04_01_04;
        private BarButtonItem M03_04_01_05;
        private BarButtonItem M03_04_01_06;
        private BarButtonItem M03_04_01_07;
        private BarButtonItem M03_04_01_08;
        private BarButtonItem M03_04_01_09;
        private BarButtonItem M03_04_02;
        private RibbonPage Mti;
        private NavBarControl navBarControl;
        private ImageList navbarImageList;
        private ImageList navbarImageListLarge;
        private NavBarGroup navM02_03;
        private NavBarItem outboxItem;
        private PopupControlContainer popupControlContainer1;
        private PopupControlContainer popupControlContainer2;
        private RibbonGalleryBarItem rgbiSkins;
        private RibbonControl ribbon;
        private DevExpress.Utils.ImageCollection ribbonImageCollection;
        private DevExpress.Utils.ImageCollection ribbonImageCollectionLarge;
        private RibbonPageGroup ribbonPageGroup1;
        private RibbonPageGroup ribbonPageGroup2;
        private RibbonStatusBar ribbonStatusBar;
        private BarStaticItem siStatus;
        private RibbonPageGroup skinsRibbonPageGroup;
        private LabelControl someLabelControl1;
        private LabelControl someLabelControl2;
        private SplitContainerControl splitContainerControl;
        private XtraTabControl tabmain;
        private NavBarItem tasksItem;
        private NavBarItem trashItem;

        public frmMain()
        {
            this.InitializeComponent();
            this.InitSkinGallery();
            this.f_load_barcontrol("");
        }

        private void barButtonItem1_ItemClick(object sender, ItemClickEventArgs e)
        {
            new frmactivekey().ShowDialog();
        }

        private void barButtonItem3_ItemClick(object sender, ItemClickEventArgs e)
        {
            UCthongso cthongso = new UCthongso();
            Form form = new Form();
            form.Controls.Add(cthongso);
            form.ShowInTaskbar = false;
            form.StartPosition = FormStartPosition.CenterScreen;
            form.ControlBox = false;
            form.Width = cthongso.Width + 10;
            form.Height = cthongso.Height + 40;
            form.ShowIcon = false;
            form.Text = "Th\x00f4ng tin đăng k\x00fd sử dụng";
            form.ShowDialog();
        }

        private void bbidangxuat_ItemClick(object sender, ItemClickEventArgs e)
        {
            this.f_closetab();
            this.f_dangnhap();
        }

        private void bbidesignReport_ItemClick(object sender, ItemClickEventArgs e)
        {
            new XtraReport().ShowDesigner();
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void f_Add_Form(string formName, string DisplayName, UserControl uc)
        {
            XtraTabPage page = new XtraTabPage {
                Name = formName,
                Text = DisplayName
            };
            page.Controls.Add(uc);
            uc.Dock = DockStyle.Fill;
            this.tabmain.TabPages.Add(page);
            this.tabmain.SelectedTabPage = page;
            uc.Focus();
        }

        private bool f_Check_IsFormOpen(string formName)
        {
            for (int i = 0; i < this.tabmain.TabPages.Count; i++)
            {
                if (this.tabmain.TabPages[i].Name == formName)
                {
                    this.tabmain.SelectedTabPageIndex = i;
                    this.tabmain.TabPages[i].Focus();
                    return true;
                }
            }
            return false;
        }

        private void f_closetab()
        {
            for (int i = 0; i < this.tabmain.TabPages.Count; i++)
            {
                this.tabmain.TabPages.RemoveAt(i--);
            }
        }

        private void f_dangnhap()
        {
            this.ribbon.Minimized = true;
            this.splitContainerControl.SplitterPosition = 0;
            this.tabmain_ControlRemoved(null, null);
            if (this._condata == null)
            {
                this._condata = new ConnectDatabase();
            }
            this.bsitennguoidung.Caption = "";
            UCdangnhap cdangnhap = new UCdangnhap {
                pCondata = this._condata
            };
            Form form = new Form();
            form.Controls.Add(cdangnhap);
            form.ShowInTaskbar = false;
            form.StartPosition = FormStartPosition.CenterScreen;
            form.ControlBox = false;
            form.Width = cdangnhap.Width + 10;
            form.Height = cdangnhap.Height + 40;
            form.ShowIcon = false;
            form.Text = "Đăng nhập";
            form.ShowDialog();
            if (!cdangnhap.pThanhCong)
            {
                Application.Exit();
            }
            else
            {
                string quyensd = "";
                if (!cdangnhap.pSystemsUser)
                {
                    this._iUserID = cdangnhap.pDangNhap.ID;
                }
                quyensd = cdangnhap.pQuyenSuDung;
                this.bsitennguoidung.Caption = "Người đăng nhập: " + cdangnhap.pTenNguoiDung;
                this.f_SetPhanQuyen(quyensd);
                this.ribbon.Minimized = false;
            }
        }

        private DataTable f_DanhSachPhanQuyen(string quyensudung)
        {
            int num;
            DataTable table = new DataTable();
            table.Columns.Add("ma");
            table.Columns.Add("ten");
            table.Columns.Add("cap");
            foreach (RibbonPage page in this.ribbon.Pages)
            {
                table.Rows.Add(new object[] { page.Name, page.Text, 1 });
                foreach (RibbonPageGroup group in page.Groups)
                {
                    if (group.Name.IndexOf("_") != -1)
                    {
                        if (group.ItemLinks.Count > 1)
                        {
                            table.Rows.Add(new object[] { group.Name.Replace("gr", ""), group.Text, 2 });
                        }
                        num = 0;
                        while (num < group.ItemLinks.Count)
                        {
                            if (group.ItemLinks[num].Item.GetType().FullName == "DevExpress.XtraBars.BarSubItem")
                            {
                                table.Rows.Add(new object[] { group.ItemLinks[num].Item.Name.Replace("gr", ""), group.ItemLinks[num].Caption, group.ItemLinks[num].Item.Name.Split(new char[] { '_' }).Length });
                                BarSubItem item = (BarSubItem) group.ItemLinks[num].Item;
                                for (int i = 0; i < item.ItemLinks.Count; i++)
                                {
                                    table.Rows.Add(new object[] { item.ItemLinks[i].Item.Name.Replace("gr", ""), item.ItemLinks[i].Caption, item.ItemLinks[i].Item.Name.Split(new char[] { '_' }).Length });
                                }
                            }
                            else
                            {
                                table.Rows.Add(new object[] { group.ItemLinks[num].Item.Name.Replace("gr", ""), group.ItemLinks[num].Caption, group.ItemLinks[num].Item.Name.Split(new char[] { '_' }).Length });
                            }
                            num++;
                        }
                    }
                }
            }
            if (quyensudung != "")
            {
                for (num = 0; num < table.Rows.Count; num++)
                {
                    if (quyensudung.IndexOf(table.Rows[num]["ma"].ToString()) == -1)
                    {
                        table.Rows.RemoveAt(num--);
                    }
                }
            }
            return table;
        }

        private void f_load_barcontrol(string strNameGroup)
        {
            for (int i = 0; i < this.navBarControl.Groups.Count; i++)
            {
                if (this.navBarControl.Groups[i].Name == strNameGroup)
                {
                    this.navBarControl.Groups[i].Visible = true;
                }
                else
                {
                    this.navBarControl.Groups[i].Visible = false;
                }
            }
        }

        private void f_loadcontrol_picmain()
        {
            PictureBox box = new PictureBox();
            this.splitContainerControl.Panel2.Controls.Add(box);
            box.Anchor = AnchorStyles.Right | AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top;
            box.Height = this.tabmain.Height;
            box.Width = this.tabmain.Width;
            box.BackgroundImageLayout = ImageLayout.Stretch;
            try
            {
                box.BackgroundImage = Image.FromFile(Environment.CurrentDirectory + @"\mainpic.jpg");
            }
            catch
            {
            }
        }

        private void f_SetPhanQuyen(string quyensd)
        {
            foreach (RibbonPage page in this.ribbon.Pages)
            {
                if (page.Name.ToLower() != "mti")
                {
                    page.Visible = (quyensd.IndexOf(page.Name) > -1) || (quyensd == "");
                    foreach (RibbonPageGroup group in page.Groups)
                    {
                        group.Visible = (quyensd.IndexOf(group.Name.Replace("gr", "")) > -1) || (quyensd == "");
                        for (int i = 0; i < group.ItemLinks.Count; i++)
                        {
                            bool vbvisi=(quyensd.IndexOf(group.ItemLinks[i].Item.Name.Replace("gr", "")) > -1) || (quyensd == "");
                            if (vbvisi)
                                group.ItemLinks[i].Item.Visibility = BarItemVisibility.Always;
                            else
                                group.ItemLinks[i].Item.Visibility = BarItemVisibility.Never;
                            if (group.ItemLinks[i].Item.GetType().FullName == "DevExpress.XtraBars.BarSubItem")
                            {
                                BarSubItem item = (BarSubItem) group.ItemLinks[i].Item;
                                for (int j = 0; j < item.ItemLinks.Count; j++)
                                {
                                    vbvisi=(quyensd.IndexOf(item.ItemLinks[j].Item.Name.Replace("gr", "")) > -1) || (quyensd == "");
                                    if (vbvisi)
                                        item.ItemLinks[j].Item.Visibility = BarItemVisibility.Always;
                                    else
                                        item.ItemLinks[j].Item.Visibility = BarItemVisibility.Never;
                                }
                            }
                        }
                    }
                }
            }
        }

        private void frmMain_FormClosing(object sender, FormClosingEventArgs e)
        {
            string activeSkinName = UserLookAndFeel.Default.ActiveLookAndFeel.ActiveSkinName;
            this.pStyleLookAndFeel = activeSkinName;
        }

        private void frmMain_Load(object sender, EventArgs e)
        {
            this.f_loadcontrol_picmain();
            this.f_closetab();
            this.f_dangnhap();
        }

        private void iExit_ItemClick(object sender, ItemClickEventArgs e)
        {
            Application.Exit();
        }

        private void InitializeComponent()
        {
            this.components = new System.ComponentModel.Container();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(frmMain));
            this.splitContainerControl = new DevExpress.XtraEditors.SplitContainerControl();
            this.navBarControl = new DevExpress.XtraNavBar.NavBarControl();
            this.navM02_03 = new DevExpress.XtraNavBar.NavBarGroup();
            this.inboxItem = new DevExpress.XtraNavBar.NavBarItem();
            this.outboxItem = new DevExpress.XtraNavBar.NavBarItem();
            this.draftsItem = new DevExpress.XtraNavBar.NavBarItem();
            this.trashItem = new DevExpress.XtraNavBar.NavBarItem();
            this.calendarItem = new DevExpress.XtraNavBar.NavBarItem();
            this.tasksItem = new DevExpress.XtraNavBar.NavBarItem();
            this.M01_01_01_ = new DevExpress.XtraNavBar.NavBarItem();
            this.M01_01_02_ = new DevExpress.XtraNavBar.NavBarItem();
            this.navbarImageListLarge = new System.Windows.Forms.ImageList(this.components);
            this.navbarImageList = new System.Windows.Forms.ImageList(this.components);
            this.tabmain = new DevExpress.XtraTab.XtraTabControl();
            this.ribbon = new DevExpress.XtraBars.Ribbon.RibbonControl();
            this.appMenu = new DevExpress.XtraBars.Ribbon.ApplicationMenu(this.components);
            this.popupControlContainer2 = new DevExpress.XtraBars.PopupControlContainer(this.components);
            this.buttonEdit = new DevExpress.XtraEditors.ButtonEdit();
            this.iExit = new DevExpress.XtraBars.BarButtonItem();
            this.popupControlContainer1 = new DevExpress.XtraBars.PopupControlContainer(this.components);
            this.someLabelControl2 = new DevExpress.XtraEditors.LabelControl();
            this.someLabelControl1 = new DevExpress.XtraEditors.LabelControl();
            this.ribbonImageCollection = new DevExpress.Utils.ImageCollection(this.components);
            this.iAbout = new DevExpress.XtraBars.BarButtonItem();
            this.siStatus = new DevExpress.XtraBars.BarStaticItem();
            this.rgbiSkins = new DevExpress.XtraBars.RibbonGalleryBarItem();
            this.M01_01_02 = new DevExpress.XtraBars.BarButtonItem();
            this.M00_01 = new DevExpress.XtraBars.BarButtonItem();
            this.M02_03_01 = new DevExpress.XtraBars.BarSubItem();
            this.M02_03_01_01 = new DevExpress.XtraBars.BarButtonItem();
            this.barButtonItem2 = new DevExpress.XtraBars.BarButtonItem();
            this.M02_03_01_03 = new DevExpress.XtraBars.BarButtonItem();
            this.M00_02 = new DevExpress.XtraBars.BarButtonItem();
            this.M01_01_01 = new DevExpress.XtraBars.BarButtonItem();
            this.M01_02 = new DevExpress.XtraBars.BarSubItem();
            this.M01_02_01 = new DevExpress.XtraBars.BarButtonItem();
            this.M00_03 = new DevExpress.XtraBars.BarButtonItem();
            this.bbidangxuat = new DevExpress.XtraBars.BarButtonItem();
            this.bsitennguoidung = new DevExpress.XtraBars.BarStaticItem();
            this.M03_01_01 = new DevExpress.XtraBars.BarButtonItem();
            this.M03_02_01 = new DevExpress.XtraBars.BarButtonItem();
            this.M03_02_02 = new DevExpress.XtraBars.BarButtonItem();
            this.M03_03 = new DevExpress.XtraBars.BarSubItem();
            this.M03_03_01 = new DevExpress.XtraBars.BarButtonItem();
            this.M03_03_02 = new DevExpress.XtraBars.BarButtonItem();
            this.M03_03_03 = new DevExpress.XtraBars.BarButtonItem();
            this.M03_03_04 = new DevExpress.XtraBars.BarButtonItem();
            this.M03_04_01 = new DevExpress.XtraBars.BarSubItem();
            this.M03_04_01_01 = new DevExpress.XtraBars.BarButtonItem();
            this.M03_04_01_02 = new DevExpress.XtraBars.BarButtonItem();
            this.M03_04_01_04 = new DevExpress.XtraBars.BarButtonItem();
            this.M03_04_01_05 = new DevExpress.XtraBars.BarButtonItem();
            this.M03_04_01_06 = new DevExpress.XtraBars.BarButtonItem();
            this.M03_04_01_07 = new DevExpress.XtraBars.BarButtonItem();
            this.M03_04_01_08 = new DevExpress.XtraBars.BarButtonItem();
            this.M03_04_01_09 = new DevExpress.XtraBars.BarButtonItem();
            this.M03_04_02 = new DevExpress.XtraBars.BarButtonItem();
            this.bbidesignReport = new DevExpress.XtraBars.BarButtonItem();
            this.barButtonItem1 = new DevExpress.XtraBars.BarButtonItem();
            this.M02_01_01 = new DevExpress.XtraBars.BarButtonItem();
            this.M02_01_02 = new DevExpress.XtraBars.BarButtonItem();
            this.M01_03_01 = new DevExpress.XtraBars.BarSubItem();
            this.M01_03_01_01 = new DevExpress.XtraBars.BarButtonItem();
            this.M01_03_01_02 = new DevExpress.XtraBars.BarButtonItem();
            this.M01_03_01_03 = new DevExpress.XtraBars.BarButtonItem();
            this.M00_04 = new DevExpress.XtraBars.BarButtonItem();
            this.M01_03_02 = new DevExpress.XtraBars.BarSubItem();
            this.M01_03_02_01 = new DevExpress.XtraBars.BarButtonItem();
            this.M01_03_02_02 = new DevExpress.XtraBars.BarButtonItem();
            this.M01_03_02_03 = new DevExpress.XtraBars.BarButtonItem();
            this.M03_01_02 = new DevExpress.XtraBars.BarButtonItem();
            this.M03_02_03 = new DevExpress.XtraBars.BarButtonItem();
            this.M02_02 = new DevExpress.XtraBars.BarSubItem();
            this.M02_02_01 = new DevExpress.XtraBars.BarButtonItem();
            this.M01_03_03 = new DevExpress.XtraBars.BarButtonItem();
            this.M01_04 = new DevExpress.XtraBars.BarSubItem();
            this.M01_04_01 = new DevExpress.XtraBars.BarButtonItem();
            this.M02_03_02 = new DevExpress.XtraBars.BarButtonItem();
            this.M03_01_03 = new DevExpress.XtraBars.BarButtonItem();
            this.barButtonItem3 = new DevExpress.XtraBars.BarButtonItem();
            this.ribbonImageCollectionLarge = new DevExpress.Utils.ImageCollection(this.components);
            this.M00 = new DevExpress.XtraBars.Ribbon.RibbonPage();
            this.grM00_01 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
            this.grM00_02 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
            this.grM00_03 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
            this.grM00_04 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
            this.M01 = new DevExpress.XtraBars.Ribbon.RibbonPage();
            this.grM01_01 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
            this.grM01_02 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
            this.grM01_03 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
            this.grM01_04 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
            this.M02 = new DevExpress.XtraBars.Ribbon.RibbonPage();
            this.grM02_01 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
            this.grM02_02 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
            this.grM02_03 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
            this.M03 = new DevExpress.XtraBars.Ribbon.RibbonPage();
            this.grM03_01 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
            this.grM03_02 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
            this.grM03_03 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
            this.grM03_04 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
            this.Mti = new DevExpress.XtraBars.Ribbon.RibbonPage();
            this.skinsRibbonPageGroup = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
            this.ribbonPageGroup1 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
            this.exitRibbonPageGroup = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
            this.ribbonPageGroup2 = new DevExpress.XtraBars.Ribbon.RibbonPageGroup();
            this.ribbonStatusBar = new DevExpress.XtraBars.Ribbon.RibbonStatusBar();
            ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl)).BeginInit();
            this.splitContainerControl.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.navBarControl)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.tabmain)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.ribbon)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.appMenu)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.popupControlContainer2)).BeginInit();
            this.popupControlContainer2.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.buttonEdit.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.popupControlContainer1)).BeginInit();
            this.popupControlContainer1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.ribbonImageCollection)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.ribbonImageCollectionLarge)).BeginInit();
            this.SuspendLayout();
            // 
            // splitContainerControl
            // 
            this.splitContainerControl.Dock = System.Windows.Forms.DockStyle.Fill;
            this.splitContainerControl.Location = new System.Drawing.Point(0, 144);
            this.splitContainerControl.Name = "splitContainerControl";
            this.splitContainerControl.Padding = new System.Windows.Forms.Padding(6);
            this.splitContainerControl.Panel1.Controls.Add(this.navBarControl);
            this.splitContainerControl.Panel1.Text = "Panel1";
            this.splitContainerControl.Panel2.Controls.Add(this.tabmain);
            this.splitContainerControl.Panel2.Text = "Panel2";
            this.splitContainerControl.Size = new System.Drawing.Size(1014, 524);
            this.splitContainerControl.SplitterPosition = 187;
            this.splitContainerControl.TabIndex = 0;
            this.splitContainerControl.Text = "splitContainerControl1";
            // 
            // navBarControl
            // 
            this.navBarControl.ActiveGroup = this.navM02_03;
            this.navBarControl.Dock = System.Windows.Forms.DockStyle.Fill;
            this.navBarControl.Groups.AddRange(new DevExpress.XtraNavBar.NavBarGroup[] {
            this.navM02_03});
            this.navBarControl.Items.AddRange(new DevExpress.XtraNavBar.NavBarItem[] {
            this.inboxItem,
            this.outboxItem,
            this.draftsItem,
            this.trashItem,
            this.calendarItem,
            this.tasksItem,
            this.M01_01_01_,
            this.M01_01_02_});
            this.navBarControl.LargeImages = this.navbarImageListLarge;
            this.navBarControl.Location = new System.Drawing.Point(0, 0);
            this.navBarControl.Name = "navBarControl";
            this.navBarControl.OptionsNavPane.ExpandedWidth = 187;
            this.navBarControl.PaintStyleKind = DevExpress.XtraNavBar.NavBarViewKind.ExplorerBar;
            this.navBarControl.Size = new System.Drawing.Size(187, 512);
            this.navBarControl.SmallImages = this.navbarImageList;
            this.navBarControl.StoreDefaultPaintStyleName = true;
            this.navBarControl.TabIndex = 0;
            this.navBarControl.Text = "navBarControl1";
            // 
            // navM02_03
            // 
            this.navM02_03.Caption = "Danh mục";
            this.navM02_03.Expanded = true;
            this.navM02_03.Name = "navM02_03";
            // 
            // inboxItem
            // 
            this.inboxItem.Caption = "Inbox";
            this.inboxItem.Name = "inboxItem";
            this.inboxItem.SmallImageIndex = 0;
            // 
            // outboxItem
            // 
            this.outboxItem.Caption = "Outbox";
            this.outboxItem.Name = "outboxItem";
            this.outboxItem.SmallImageIndex = 1;
            // 
            // draftsItem
            // 
            this.draftsItem.Caption = "Drafts";
            this.draftsItem.Name = "draftsItem";
            this.draftsItem.SmallImageIndex = 2;
            // 
            // trashItem
            // 
            this.trashItem.Caption = "Trash";
            this.trashItem.Name = "trashItem";
            this.trashItem.SmallImageIndex = 3;
            // 
            // calendarItem
            // 
            this.calendarItem.Caption = "Calendar";
            this.calendarItem.Name = "calendarItem";
            this.calendarItem.SmallImageIndex = 4;
            // 
            // tasksItem
            // 
            this.tasksItem.Caption = "Tasks";
            this.tasksItem.Name = "tasksItem";
            this.tasksItem.SmallImageIndex = 5;
            // 
            // M01_01_01_
            // 
            this.M01_01_01_.Caption = "Đăng ký khám bệnh";
            this.M01_01_01_.Name = "M01_01_01_";
            this.M01_01_01_.LinkClicked += new DevExpress.XtraNavBar.NavBarLinkEventHandler(this.M01_01_01_LinkClicked);
            // 
            // M01_01_02_
            // 
            this.M01_01_02_.Caption = "Khám bệnh";
            this.M01_01_02_.Name = "M01_01_02_";
            this.M01_01_02_.LinkClicked += new DevExpress.XtraNavBar.NavBarLinkEventHandler(this.M01_01_02_LinkClicked);
            // 
            // navbarImageListLarge
            // 
            this.navbarImageListLarge.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
            this.navbarImageListLarge.ImageSize = new System.Drawing.Size(16, 16);
            this.navbarImageListLarge.TransparentColor = System.Drawing.Color.Transparent;
            // 
            // navbarImageList
            // 
            this.navbarImageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
            this.navbarImageList.ImageSize = new System.Drawing.Size(16, 16);
            this.navbarImageList.TransparentColor = System.Drawing.Color.Transparent;
            // 
            // tabmain
            // 
            this.tabmain.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
            this.tabmain.ClosePageButtonShowMode = DevExpress.XtraTab.ClosePageButtonShowMode.InAllTabPageHeaders;
            this.tabmain.Dock = System.Windows.Forms.DockStyle.Fill;
            this.tabmain.Location = new System.Drawing.Point(0, 0);
            this.tabmain.Name = "tabmain";
            this.tabmain.Size = new System.Drawing.Size(810, 512);
            this.tabmain.TabIndex = 0;
            this.tabmain.SelectedPageChanged += new DevExpress.XtraTab.TabPageChangedEventHandler(this.tabmain_SelectedPageChanged);
            this.tabmain.CloseButtonClick += new System.EventHandler(this.tabmain_CloseButtonClick);
            this.tabmain.ControlAdded += new System.Windows.Forms.ControlEventHandler(this.tabmain_ControlAdded);
            this.tabmain.ControlRemoved += new System.Windows.Forms.ControlEventHandler(this.tabmain_ControlRemoved);
            // 
            // ribbon
            // 
            this.ribbon.ApplicationButtonDropDownControl = this.appMenu;
            this.ribbon.ApplicationButtonText = null;
            this.ribbon.ApplicationIcon = ((System.Drawing.Bitmap)(resources.GetObject("ribbon.ApplicationIcon")));
            this.ribbon.ExpandCollapseItem.Id = 0;
            this.ribbon.Images = this.ribbonImageCollection;
            this.ribbon.Items.AddRange(new DevExpress.XtraBars.BarItem[] {
            this.ribbon.ExpandCollapseItem,
            this.iExit,
            this.iAbout,
            this.siStatus,
            this.rgbiSkins,
            this.M01_01_02,
            this.M00_01,
            this.M02_03_01,
            this.M00_02,
            this.M01_01_01,
            this.M01_02,
            this.M00_03,
            this.bbidangxuat,
            this.bsitennguoidung,
            this.M03_01_01,
            this.M03_02_01,
            this.M03_02_02,
            this.M03_03,
            this.M03_04_01,
            this.M03_04_01_01,
            this.M03_04_01_02,
            this.M02_03_01_01,
            this.M03_03_01,
            this.M03_03_02,
            this.M03_03_03,
            this.M03_03_04,
            this.M03_04_02,
            this.bbidesignReport,
            this.M03_04_01_04,
            this.M03_04_01_05,
            this.barButtonItem1,
            this.M02_01_01,
            this.M02_01_02,
            this.M01_03_01,
            this.M01_03_01_01,
            this.M01_03_01_02,
            this.M01_03_01_03,
            this.M00_04,
            this.M01_03_02,
            this.M01_03_02_01,
            this.M01_03_02_02,
            this.M01_03_02_03,
            this.M03_01_02,
            this.M03_02_03,
            this.M03_04_01_06,
            this.M03_04_01_07,
            this.M03_04_01_08,
            this.M03_04_01_09,
            this.M02_02,
            this.M02_02_01,
            this.M01_03_03,
            this.M01_04,
            this.M01_04_01,
            this.barButtonItem2,
            this.M02_03_01_03,
            this.M02_03_02,
            this.M03_01_03,
            this.M01_02_01,
            this.barButtonItem3});
            this.ribbon.LargeImages = this.ribbonImageCollectionLarge;
            this.ribbon.Location = new System.Drawing.Point(0, 0);
            this.ribbon.MaxItemId = 129;
            this.ribbon.Name = "ribbon";
            this.ribbon.PageHeaderItemLinks.Add(this.iAbout);
            this.ribbon.Pages.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPage[] {
            this.M00,
            this.M01,
            this.M02,
            this.M03,
            this.Mti});
            this.ribbon.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonControlStyle.Office2007;
            this.ribbon.ShowToolbarCustomizeItem = false;
            this.ribbon.Size = new System.Drawing.Size(1014, 144);
            this.ribbon.StatusBar = this.ribbonStatusBar;
            this.ribbon.Toolbar.ItemLinks.Add(this.bbidangxuat);
            this.ribbon.Toolbar.ItemLinks.Add(this.bsitennguoidung);
            this.ribbon.Toolbar.ShowCustomizeItem = false;
            // 
            // appMenu
            // 
            this.appMenu.BottomPaneControlContainer = this.popupControlContainer2;
            this.appMenu.ItemLinks.Add(this.iExit);
            this.appMenu.Name = "appMenu";
            this.appMenu.Ribbon = this.ribbon;
            this.appMenu.RightPaneControlContainer = this.popupControlContainer1;
            this.appMenu.ShowRightPane = true;
            // 
            // popupControlContainer2
            // 
            this.popupControlContainer2.Appearance.BackColor = System.Drawing.Color.Transparent;
            this.popupControlContainer2.Appearance.Options.UseBackColor = true;
            this.popupControlContainer2.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
            this.popupControlContainer2.Controls.Add(this.buttonEdit);
            this.popupControlContainer2.Location = new System.Drawing.Point(238, 289);
            this.popupControlContainer2.Name = "popupControlContainer2";
            this.popupControlContainer2.Ribbon = this.ribbon;
            this.popupControlContainer2.Size = new System.Drawing.Size(118, 28);
            this.popupControlContainer2.TabIndex = 3;
            this.popupControlContainer2.Visible = false;
            // 
            // buttonEdit
            // 
            this.buttonEdit.EditValue = "Some Text";
            this.buttonEdit.Location = new System.Drawing.Point(3, 5);
            this.buttonEdit.MenuManager = this.ribbon;
            this.buttonEdit.Name = "buttonEdit";
            this.buttonEdit.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
            new DevExpress.XtraEditors.Controls.EditorButton()});
            this.buttonEdit.Size = new System.Drawing.Size(100, 20);
            this.buttonEdit.TabIndex = 0;
            // 
            // iExit
            // 
            this.iExit.Caption = "Exit";
            this.iExit.Description = "Closes this program after prompting you to save unsaved data.";
            this.iExit.Hint = "Closes this program after prompting you to save unsaved data";
            this.iExit.Id = 20;
            this.iExit.ImageIndex = 6;
            this.iExit.LargeImageIndex = 6;
            this.iExit.Name = "iExit";
            this.iExit.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.iExit_ItemClick);
            // 
            // popupControlContainer1
            // 
            this.popupControlContainer1.Appearance.BackColor = System.Drawing.Color.Transparent;
            this.popupControlContainer1.Appearance.Options.UseBackColor = true;
            this.popupControlContainer1.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder;
            this.popupControlContainer1.Controls.Add(this.someLabelControl2);
            this.popupControlContainer1.Controls.Add(this.someLabelControl1);
            this.popupControlContainer1.Location = new System.Drawing.Point(111, 197);
            this.popupControlContainer1.Name = "popupControlContainer1";
            this.popupControlContainer1.Ribbon = this.ribbon;
            this.popupControlContainer1.Size = new System.Drawing.Size(76, 70);
            this.popupControlContainer1.TabIndex = 2;
            this.popupControlContainer1.Visible = false;
            // 
            // someLabelControl2
            // 
            this.someLabelControl2.Location = new System.Drawing.Point(3, 57);
            this.someLabelControl2.Name = "someLabelControl2";
            this.someLabelControl2.Size = new System.Drawing.Size(49, 13);
            this.someLabelControl2.TabIndex = 0;
            this.someLabelControl2.Text = "Some Info";
            // 
            // someLabelControl1
            // 
            this.someLabelControl1.Location = new System.Drawing.Point(3, 3);
            this.someLabelControl1.Name = "someLabelControl1";
            this.someLabelControl1.Size = new System.Drawing.Size(49, 13);
            this.someLabelControl1.TabIndex = 0;
            this.someLabelControl1.Text = "Some Info";
            // 
            // ribbonImageCollection
            // 
            this.ribbonImageCollection.ImageStream = ((DevExpress.Utils.ImageCollectionStreamer)(resources.GetObject("ribbonImageCollection.ImageStream")));
            // 
            // iAbout
            // 
            this.iAbout.Caption = "About";
            this.iAbout.Description = "Displays general program information.";
            this.iAbout.Hint = "Displays general program information";
            this.iAbout.Id = 24;
            this.iAbout.ImageIndex = 8;
            this.iAbout.LargeImageIndex = 8;
            this.iAbout.Name = "iAbout";
            // 
            // siStatus
            // 
            this.siStatus.Caption = " ";
            this.siStatus.Id = 31;
            this.siStatus.Name = "siStatus";
            this.siStatus.TextAlignment = System.Drawing.StringAlignment.Near;
            // 
            // rgbiSkins
            // 
            this.rgbiSkins.Caption = "Skins";
            // 
            // 
            // 
            this.rgbiSkins.Gallery.AllowHoverImages = true;
            this.rgbiSkins.Gallery.Appearance.ItemCaptionAppearance.Normal.Options.UseFont = true;
            this.rgbiSkins.Gallery.Appearance.ItemCaptionAppearance.Normal.Options.UseTextOptions = true;
            this.rgbiSkins.Gallery.Appearance.ItemCaptionAppearance.Normal.TextOptions.HAlignment = DevExpress.Utils.HorzAlignment.Center;
            this.rgbiSkins.Gallery.ColumnCount = 4;
            this.rgbiSkins.Gallery.FixedHoverImageSize = false;
            this.rgbiSkins.Gallery.ImageSize = new System.Drawing.Size(32, 17);
            this.rgbiSkins.Gallery.ItemImageLocation = DevExpress.Utils.Locations.Top;
            this.rgbiSkins.Gallery.RowCount = 4;
            this.rgbiSkins.Id = 60;
            this.rgbiSkins.Name = "rgbiSkins";
            // 
            // M01_01_02
            // 
            this.M01_01_02.Caption = "Phiếu khám bệnh";
            this.M01_01_02.Id = 63;
            this.M01_01_02.LargeWidth = 70;
            this.M01_01_02.Name = "M01_01_02";
            this.M01_01_02.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.Large;
            this.M01_01_02.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.M01_01_ItemClick);
            // 
            // M00_01
            // 
            this.M00_01.Caption = "Chọn CSDL";
            this.M00_01.Id = 65;
            this.M00_01.LargeGlyph = global::QLPhongKham.Properties.Resources.database_connect;
            this.M00_01.LargeWidth = 80;
            this.M00_01.Name = "M00_01";
            this.M00_01.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.Large;
            this.M00_01.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.M00_01_ItemClick);
            // 
            // M02_03_01
            // 
            this.M02_03_01.Caption = "Danh mục";
            this.M02_03_01.Id = 66;
            this.M02_03_01.LargeWidth = 80;
            this.M02_03_01.LinksPersistInfo.AddRange(new DevExpress.XtraBars.LinkPersistInfo[] {
            new DevExpress.XtraBars.LinkPersistInfo(this.M02_03_01_01),
            new DevExpress.XtraBars.LinkPersistInfo(this.barButtonItem2),
            new DevExpress.XtraBars.LinkPersistInfo(this.M02_03_01_03)});
            this.M02_03_01.Name = "M02_03_01";
            this.M02_03_01.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.Large;
            this.M02_03_01.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.M02_03_ItemClick);
            // 
            // M02_03_01_01
            // 
            this.M02_03_01_01.Caption = "1. Giá viện phí";
            this.M02_03_01_01.Id = 88;
            this.M02_03_01_01.Name = "M02_03_01_01";
            this.M02_03_01_01.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.M02_03_02_ItemClick);
            // 
            // barButtonItem2
            // 
            this.barButtonItem2.Caption = "2. Nhóm viện phí";
            this.barButtonItem2.Id = 123;
            this.barButtonItem2.Name = "barButtonItem2";
            // 
            // M02_03_01_03
            // 
            this.M02_03_01_03.Caption = "3. Quyển sổ";
            this.M02_03_01_03.Id = 124;
            this.M02_03_01_03.Name = "M02_03_01_03";
            this.M02_03_01_03.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.M02_03_04_ItemClick);
            // 
            // M00_02
            // 
            this.M00_02.Caption = "Phân quyền sử dụng";
            this.M00_02.Id = 67;
            this.M00_02.LargeGlyph = global::QLPhongKham.Properties.Resources.imgconfig;
            this.M00_02.LargeWidth = 80;
            this.M00_02.Name = "M00_02";
            this.M00_02.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.Large;
            this.M00_02.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.M00_02_ItemClick);
            // 
            // M01_01_01
            // 
            this.M01_01_01.Caption = "Đăng ký khám bệnh";
            this.M01_01_01.Id = 68;
            this.M01_01_01.LargeWidth = 70;
            this.M01_01_01.Name = "M01_01_01";
            this.M01_01_01.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.Large;
            this.M01_01_01.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.M01_01_01_ItemClick);
            // 
            // M01_02
            // 
            this.M01_02.Caption = "Báo cáo";
            this.M01_02.Id = 71;
            this.M01_02.LargeWidth = 80;
            this.M01_02.LinksPersistInfo.AddRange(new DevExpress.XtraBars.LinkPersistInfo[] {
            new DevExpress.XtraBars.LinkPersistInfo(this.M01_02_01)});
            this.M01_02.Name = "M01_02";
            this.M01_02.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.Large;
            // 
            // M01_02_01
            // 
            this.M01_02_01.Caption = "1. Danh sách đăng ký khám bệnh";
            this.M01_02_01.Id = 127;
            this.M01_02_01.Name = "M01_02_01";
            this.M01_02_01.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.M01_02_01_ItemClick);
            // 
            // M00_03
            // 
            this.M00_03.Caption = "Quản lý đăng nhập";
            this.M00_03.Id = 74;
            this.M00_03.LargeWidth = 70;
            this.M00_03.Name = "M00_03";
            this.M00_03.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.Large;
            this.M00_03.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.M00_03_ItemClick);
            // 
            // bbidangxuat
            // 
            this.bbidangxuat.Caption = "Đăng xuất";
            this.bbidangxuat.Glyph = ((System.Drawing.Image)(resources.GetObject("bbidangxuat.Glyph")));
            this.bbidangxuat.Id = 75;
            this.bbidangxuat.LargeGlyph = ((System.Drawing.Image)(resources.GetObject("bbidangxuat.LargeGlyph")));
            this.bbidangxuat.Name = "bbidangxuat";
            this.bbidangxuat.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.bbidangxuat_ItemClick);
            // 
            // bsitennguoidung
            // 
            this.bsitennguoidung.Id = 76;
            this.bsitennguoidung.Name = "bsitennguoidung";
            this.bsitennguoidung.ShowImageInToolbar = false;
            this.bsitennguoidung.TextAlignment = System.Drawing.StringAlignment.Near;
            // 
            // M03_01_01
            // 
            this.M03_01_01.Caption = "Nhập kho";
            this.M03_01_01.Id = 81;
            this.M03_01_01.LargeWidth = 70;
            this.M03_01_01.Name = "M03_01_01";
            this.M03_01_01.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.Large;
            this.M03_01_01.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.M03_01_01_ItemClick);
            // 
            // M03_02_01
            // 
            this.M03_02_01.Caption = "Xuất cho bệnh nhân";
            this.M03_02_01.Id = 82;
            this.M03_02_01.LargeWidth = 70;
            this.M03_02_01.Name = "M03_02_01";
            this.M03_02_01.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.Large;
            // 
            // M03_02_02
            // 
            this.M03_02_02.Caption = "Bán thuốc";
            this.M03_02_02.Id = 83;
            this.M03_02_02.LargeWidth = 70;
            this.M03_02_02.Name = "M03_02_02";
            this.M03_02_02.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.Large;
            this.M03_02_02.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.M03_02_02_ItemClick);
            // 
            // M03_03
            // 
            this.M03_03.Caption = "Báo cáo";
            this.M03_03.Id = 84;
            this.M03_03.LargeWidth = 70;
            this.M03_03.LinksPersistInfo.AddRange(new DevExpress.XtraBars.LinkPersistInfo[] {
            new DevExpress.XtraBars.LinkPersistInfo(this.M03_03_01),
            new DevExpress.XtraBars.LinkPersistInfo(this.M03_03_02),
            new DevExpress.XtraBars.LinkPersistInfo(this.M03_03_03),
            new DevExpress.XtraBars.LinkPersistInfo(this.M03_03_04)});
            this.M03_03.Name = "M03_03";
            this.M03_03.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.Large;
            // 
            // M03_03_01
            // 
            this.M03_03_01.Caption = "1. Bảng kê sổ nhập kho";
            this.M03_03_01.Id = 89;
            this.M03_03_01.Name = "M03_03_01";
            this.M03_03_01.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.M03_03_01_ItemClick);
            // 
            // M03_03_02
            // 
            this.M03_03_02.Caption = "2. Bảng kê xuất kho";
            this.M03_03_02.Id = 90;
            this.M03_03_02.Name = "M03_03_02";
            // 
            // M03_03_03
            // 
            this.M03_03_03.Caption = "3. Bảng kê tồn kho chi tiết";
            this.M03_03_03.Id = 91;
            this.M03_03_03.Name = "M03_03_03";
            this.M03_03_03.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.M03_03_03_ItemClick);
            // 
            // M03_03_04
            // 
            this.M03_03_04.Caption = "4. Báo cáo tồn kho tổng hợp";
            this.M03_03_04.Id = 92;
            this.M03_03_04.Name = "M03_03_04";
            this.M03_03_04.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.M03_03_04_ItemClick);
            // 
            // M03_04_01
            // 
            this.M03_04_01.Caption = "Danh mục";
            this.M03_04_01.Id = 85;
            this.M03_04_01.LargeWidth = 80;
            this.M03_04_01.LinksPersistInfo.AddRange(new DevExpress.XtraBars.LinkPersistInfo[] {
            new DevExpress.XtraBars.LinkPersistInfo(this.M03_04_01_01),
            new DevExpress.XtraBars.LinkPersistInfo(this.M03_04_01_02),
            new DevExpress.XtraBars.LinkPersistInfo(this.M03_04_01_04),
            new DevExpress.XtraBars.LinkPersistInfo(this.M03_04_01_05),
            new DevExpress.XtraBars.LinkPersistInfo(this.M03_04_01_06),
            new DevExpress.XtraBars.LinkPersistInfo(this.M03_04_01_07),
            new DevExpress.XtraBars.LinkPersistInfo(this.M03_04_01_08),
            new DevExpress.XtraBars.LinkPersistInfo(this.M03_04_01_09)});
            this.M03_04_01.Name = "M03_04_01";
            this.M03_04_01.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph;
            this.M03_04_01.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.Large;
            // 
            // M03_04_01_01
            // 
            this.M03_04_01_01.Caption = "1. Dược phẩm";
            this.M03_04_01_01.Id = 86;
            this.M03_04_01_01.Name = "M03_04_01_01";
            this.M03_04_01_01.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.M03_04_01_ItemClick);
            // 
            // M03_04_01_02
            // 
            this.M03_04_01_02.Caption = "2. Nhà cung cấp";
            this.M03_04_01_02.Id = 87;
            this.M03_04_01_02.Name = "M03_04_01_02";
            this.M03_04_01_02.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.M03_04_02_ItemClick);
            // 
            // M03_04_01_04
            // 
            this.M03_04_01_04.Caption = "3. Vị trí trong kho";
            this.M03_04_01_04.Id = 95;
            this.M03_04_01_04.Name = "M03_04_01_04";
            this.M03_04_01_04.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.M03_04_04_ItemClick);
            // 
            // M03_04_01_05
            // 
            this.M03_04_01_05.Caption = "4. Quy đổi";
            this.M03_04_01_05.Id = 96;
            this.M03_04_01_05.Name = "M03_04_01_05";
            this.M03_04_01_05.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.M03_04_05_ItemClick);
            // 
            // M03_04_01_06
            // 
            this.M03_04_01_06.Caption = "5. Cách dùng";
            this.M03_04_01_06.Id = 113;
            this.M03_04_01_06.Name = "M03_04_01_06";
            this.M03_04_01_06.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.M03_04_01_06_ItemClick);
            // 
            // M03_04_01_07
            // 
            this.M03_04_01_07.Caption = "6. Nhà sản xuất";
            this.M03_04_01_07.Id = 114;
            this.M03_04_01_07.Name = "M03_04_01_07";
            this.M03_04_01_07.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.M03_04_01_07_ItemClick);
            // 
            // M03_04_01_08
            // 
            this.M03_04_01_08.Caption = "7. Nhóm dược phẩm";
            this.M03_04_01_08.Id = 115;
            this.M03_04_01_08.Name = "M03_04_01_08";
            this.M03_04_01_08.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.M03_04_01_08_ItemClick);
            // 
            // M03_04_01_09
            // 
            this.M03_04_01_09.Caption = "8. Loại dược phẩm";
            this.M03_04_01_09.Id = 116;
            this.M03_04_01_09.Name = "M03_04_01_09";
            this.M03_04_01_09.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.M03_04_01_09_ItemClick);
            // 
            // M03_04_02
            // 
            this.M03_04_02.Caption = "Thông số";
            this.M03_04_02.Id = 93;
            this.M03_04_02.LargeWidth = 70;
            this.M03_04_02.Name = "M03_04_02";
            this.M03_04_02.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.Large;
            this.M03_04_02.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.M03_04_03_ItemClick);
            // 
            // bbidesignReport
            // 
            this.bbidesignReport.Caption = "Design Report";
            this.bbidesignReport.Id = 94;
            this.bbidesignReport.LargeWidth = 70;
            this.bbidesignReport.Name = "bbidesignReport";
            this.bbidesignReport.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.Large;
            this.bbidesignReport.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.bbidesignReport_ItemClick);
            // 
            // barButtonItem1
            // 
            this.barButtonItem1.Caption = "Mã đăng ký";
            this.barButtonItem1.Id = 97;
            this.barButtonItem1.Name = "barButtonItem1";
            this.barButtonItem1.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barButtonItem1_ItemClick);
            // 
            // M02_01_01
            // 
            this.M02_01_01.Caption = "Thu tiền";
            this.M02_01_01.Id = 98;
            this.M02_01_01.LargeWidth = 80;
            this.M02_01_01.Name = "M02_01_01";
            this.M02_01_01.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.Large;
            this.M02_01_01.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.M02_01_ItemClick);
            // 
            // M02_01_02
            // 
            this.M02_01_02.Caption = "Thu phí";
            this.M02_01_02.Id = 99;
            this.M02_01_02.LargeWidth = 80;
            this.M02_01_02.Name = "M02_01_02";
            this.M02_01_02.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.Large;
            this.M02_01_02.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.M02_01_02_ItemClick);
            // 
            // M01_03_01
            // 
            this.M01_03_01.Caption = "Danh mục";
            this.M01_03_01.Id = 100;
            this.M01_03_01.LargeWidth = 80;
            this.M01_03_01.LinksPersistInfo.AddRange(new DevExpress.XtraBars.LinkPersistInfo[] {
            new DevExpress.XtraBars.LinkPersistInfo(this.M01_03_01_01),
            new DevExpress.XtraBars.LinkPersistInfo(this.M01_03_01_02),
            new DevExpress.XtraBars.LinkPersistInfo(this.M01_03_01_03)});
            this.M01_03_01.Name = "M01_03_01";
            this.M01_03_01.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.Large;
            // 
            // M01_03_01_01
            // 
            this.M01_03_01_01.Caption = "1. Bệnh tật";
            this.M01_03_01_01.Id = 103;
            this.M01_03_01_01.Name = "M01_03_01_01";
            this.M01_03_01_01.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.M01_03_01_ItemClick);
            // 
            // M01_03_01_02
            // 
            this.M01_03_01_02.Caption = "2. Khoa phòng";
            this.M01_03_01_02.Id = 104;
            this.M01_03_01_02.Name = "M01_03_01_02";
            this.M01_03_01_02.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.M01_03_03_ItemClick);
            // 
            // M01_03_01_03
            // 
            this.M01_03_01_03.Caption = "3. Bác sĩ";
            this.M01_03_01_03.Id = 105;
            this.M01_03_01_03.Name = "M01_03_01_03";
            this.M01_03_01_03.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.M01_03_02_ItemClick);
            // 
            // M00_04
            // 
            this.M00_04.Caption = "Đổi mật khẩu";
            this.M00_04.Id = 106;
            this.M00_04.LargeGlyph = global::QLPhongKham.Properties.Resources.password;
            this.M00_04.LargeWidth = 70;
            this.M00_04.Name = "M00_04";
            this.M00_04.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.Large;
            this.M00_04.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.M00_04_ItemClick);
            // 
            // M01_03_02
            // 
            this.M01_03_02.Caption = "Hành chính";
            this.M01_03_02.Id = 107;
            this.M01_03_02.LargeWidth = 80;
            this.M01_03_02.LinksPersistInfo.AddRange(new DevExpress.XtraBars.LinkPersistInfo[] {
            new DevExpress.XtraBars.LinkPersistInfo(this.M01_03_02_01),
            new DevExpress.XtraBars.LinkPersistInfo(this.M01_03_02_02),
            new DevExpress.XtraBars.LinkPersistInfo(this.M01_03_02_03)});
            this.M01_03_02.Name = "M01_03_02";
            this.M01_03_02.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.Large;
            // 
            // M01_03_02_01
            // 
            this.M01_03_02_01.Caption = "1. Tỉnh thành";
            this.M01_03_02_01.Id = 108;
            this.M01_03_02_01.Name = "M01_03_02_01";
            this.M01_03_02_01.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.M01_03_02_01_ItemClick);
            // 
            // M01_03_02_02
            // 
            this.M01_03_02_02.Caption = "2. Quận huyện";
            this.M01_03_02_02.Id = 109;
            this.M01_03_02_02.Name = "M01_03_02_02";
            this.M01_03_02_02.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.M01_03_02_02_ItemClick);
            // 
            // M01_03_02_03
            // 
            this.M01_03_02_03.Caption = "3. Phường xã";
            this.M01_03_02_03.Id = 110;
            this.M01_03_02_03.Name = "M01_03_02_03";
            this.M01_03_02_03.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.M01_03_02_03_ItemClick);
            // 
            // M03_01_02
            // 
            this.M03_01_02.Caption = "Đặt hàng";
            this.M03_01_02.Id = 111;
            this.M03_01_02.LargeWidth = 70;
            this.M03_01_02.Name = "M03_01_02";
            this.M03_01_02.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.Large;
            this.M03_01_02.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.M03_01_02_ItemClick);
            // 
            // M03_02_03
            // 
            this.M03_02_03.Caption = "Không kê đơn";
            this.M03_02_03.Id = 112;
            this.M03_02_03.LargeWidth = 70;
            this.M03_02_03.Name = "M03_02_03";
            this.M03_02_03.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.Large;
            this.M03_02_03.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.M03_02_03_ItemClick);
            // 
            // M02_02
            // 
            this.M02_02.Caption = "Báo cáo";
            this.M02_02.Id = 117;
            this.M02_02.LargeWidth = 70;
            this.M02_02.LinksPersistInfo.AddRange(new DevExpress.XtraBars.LinkPersistInfo[] {
            new DevExpress.XtraBars.LinkPersistInfo(this.M02_02_01)});
            this.M02_02.Name = "M02_02";
            this.M02_02.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.Large;
            // 
            // M02_02_01
            // 
            this.M02_02_01.Caption = "1. Doanh thu";
            this.M02_02_01.Id = 118;
            this.M02_02_01.Name = "M02_02_01";
            this.M02_02_01.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.M02_02_01_ItemClick);
            // 
            // M01_03_03
            // 
            this.M01_03_03.Caption = "Thông số";
            this.M01_03_03.Id = 119;
            this.M01_03_03.LargeWidth = 70;
            this.M01_03_03.Name = "M01_03_03";
            this.M01_03_03.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.Large;
            this.M01_03_03.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.M01_03_03_ItemClick_1);
            // 
            // M01_04
            // 
            this.M01_04.Caption = "Tiện ích";
            this.M01_04.Id = 121;
            this.M01_04.LargeWidth = 70;
            this.M01_04.LinksPersistInfo.AddRange(new DevExpress.XtraBars.LinkPersistInfo[] {
            new DevExpress.XtraBars.LinkPersistInfo(this.M01_04_01)});
            this.M01_04.Name = "M01_04";
            this.M01_04.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.Large;
            // 
            // M01_04_01
            // 
            this.M01_04_01.Caption = "1. Sửa thông tin bệnh nhân";
            this.M01_04_01.Id = 122;
            this.M01_04_01.Name = "M01_04_01";
            this.M01_04_01.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.M01_04_01_ItemClick);
            // 
            // M02_03_02
            // 
            this.M02_03_02.Caption = "Thông số";
            this.M02_03_02.Id = 125;
            this.M02_03_02.LargeWidth = 70;
            this.M02_03_02.Name = "M02_03_02";
            this.M02_03_02.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.Large;
            this.M02_03_02.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.M02_03_02_ItemClick_1);
            // 
            // M03_01_03
            // 
            this.M03_01_03.Caption = "Khai báo tồn kho";
            this.M03_01_03.Id = 126;
            this.M03_01_03.LargeWidth = 70;
            this.M03_01_03.Name = "M03_01_03";
            this.M03_01_03.RibbonStyle = DevExpress.XtraBars.Ribbon.RibbonItemStyles.Large;
            this.M03_01_03.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.M03_01_03_ItemClick);
            // 
            // barButtonItem3
            // 
            this.barButtonItem3.Caption = "Thông tin đăng ký";
            this.barButtonItem3.Id = 128;
            this.barButtonItem3.Name = "barButtonItem3";
            this.barButtonItem3.ItemClick += new DevExpress.XtraBars.ItemClickEventHandler(this.barButtonItem3_ItemClick);
            // 
            // ribbonImageCollectionLarge
            // 
            this.ribbonImageCollectionLarge.ImageSize = new System.Drawing.Size(32, 32);
            this.ribbonImageCollectionLarge.ImageStream = ((DevExpress.Utils.ImageCollectionStreamer)(resources.GetObject("ribbonImageCollectionLarge.ImageStream")));
            // 
            // M00
            // 
            this.M00.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] {
            this.grM00_01,
            this.grM00_02,
            this.grM00_03,
            this.grM00_04});
            this.M00.Name = "M00";
            this.M00.Text = "Hệ thống";
            // 
            // grM00_01
            // 
            this.grM00_01.ItemLinks.Add(this.M00_01);
            this.grM00_01.Name = "grM00_01";
            this.grM00_01.ShowCaptionButton = false;
            // 
            // grM00_02
            // 
            this.grM00_02.ItemLinks.Add(this.M00_02);
            this.grM00_02.Name = "grM00_02";
            this.grM00_02.ShowCaptionButton = false;
            // 
            // grM00_03
            // 
            this.grM00_03.ItemLinks.Add(this.M00_03);
            this.grM00_03.Name = "grM00_03";
            this.grM00_03.ShowCaptionButton = false;
            // 
            // grM00_04
            // 
            this.grM00_04.ItemLinks.Add(this.M00_04);
            this.grM00_04.Name = "grM00_04";
            this.grM00_04.ShowCaptionButton = false;
            // 
            // M01
            // 
            this.M01.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] {
            this.grM01_01,
            this.grM01_02,
            this.grM01_03,
            this.grM01_04});
            this.M01.Name = "M01";
            this.M01.Text = "Bệnh nhân";
            // 
            // grM01_01
            // 
            this.grM01_01.ItemLinks.Add(this.M01_01_01);
            this.grM01_01.ItemLinks.Add(this.M01_01_02);
            this.grM01_01.Name = "grM01_01";
            this.grM01_01.ShowCaptionButton = false;
            this.grM01_01.Text = "Khám bệnh";
            // 
            // grM01_02
            // 
            this.grM01_02.ItemLinks.Add(this.M01_02);
            this.grM01_02.Name = "grM01_02";
            this.grM01_02.ShowCaptionButton = false;
            // 
            // grM01_03
            // 
            this.grM01_03.ItemLinks.Add(this.M01_03_01);
            this.grM01_03.ItemLinks.Add(this.M01_03_02);
            this.grM01_03.ItemLinks.Add(this.M01_03_03);
            this.grM01_03.Name = "grM01_03";
            this.grM01_03.ShowCaptionButton = false;
            this.grM01_03.Text = "Khai báo";
            // 
            // grM01_04
            // 
            this.grM01_04.ItemLinks.Add(this.M01_04);
            this.grM01_04.Name = "grM01_04";
            this.grM01_04.ShowCaptionButton = false;
            // 
            // M02
            // 
            this.M02.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] {
            this.grM02_01,
            this.grM02_02,
            this.grM02_03});
            this.M02.Name = "M02";
            this.M02.Text = "Thu phí";
            // 
            // grM02_01
            // 
            this.grM02_01.ItemLinks.Add(this.M02_01_01);
            this.grM02_01.ItemLinks.Add(this.M02_01_02);
            this.grM02_01.Name = "grM02_01";
            this.grM02_01.ShowCaptionButton = false;
            this.grM02_01.Text = "Nhập liệu";
            // 
            // grM02_02
            // 
            this.grM02_02.ItemLinks.Add(this.M02_02);
            this.grM02_02.Name = "grM02_02";
            this.grM02_02.ShowCaptionButton = false;
            // 
            // grM02_03
            // 
            this.grM02_03.ItemLinks.Add(this.M02_03_01);
            this.grM02_03.ItemLinks.Add(this.M02_03_02);
            this.grM02_03.Name = "grM02_03";
            this.grM02_03.ShowCaptionButton = false;
            this.grM02_03.Text = "Khai báo";
            // 
            // M03
            // 
            this.M03.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] {
            this.grM03_01,
            this.grM03_02,
            this.grM03_03,
            this.grM03_04});
            this.M03.Name = "M03";
            this.M03.Text = "Dược";
            // 
            // grM03_01
            // 
            this.grM03_01.ItemLinks.Add(this.M03_01_01);
            this.grM03_01.ItemLinks.Add(this.M03_01_02);
            this.grM03_01.ItemLinks.Add(this.M03_01_03);
            this.grM03_01.Name = "grM03_01";
            this.grM03_01.ShowCaptionButton = false;
            this.grM03_01.Text = "Nhập liệu";
            // 
            // grM03_02
            // 
            this.grM03_02.ItemLinks.Add(this.M03_02_01);
            this.grM03_02.ItemLinks.Add(this.M03_02_02);
            this.grM03_02.ItemLinks.Add(this.M03_02_03);
            this.grM03_02.Name = "grM03_02";
            this.grM03_02.ShowCaptionButton = false;
            this.grM03_02.Text = "Xuất kho";
            // 
            // grM03_03
            // 
            this.grM03_03.ItemLinks.Add(this.M03_03);
            this.grM03_03.Name = "grM03_03";
            this.grM03_03.ShowCaptionButton = false;
            // 
            // grM03_04
            // 
            this.grM03_04.ItemLinks.Add(this.M03_04_01);
            this.grM03_04.ItemLinks.Add(this.M03_04_02);
            this.grM03_04.Name = "grM03_04";
            this.grM03_04.ShowCaptionButton = false;
            this.grM03_04.Text = "Tùy chỉnh";
            // 
            // Mti
            // 
            this.Mti.Groups.AddRange(new DevExpress.XtraBars.Ribbon.RibbonPageGroup[] {
            this.skinsRibbonPageGroup,
            this.ribbonPageGroup1,
            this.exitRibbonPageGroup,
            this.ribbonPageGroup2});
            this.Mti.Name = "Mti";
            this.Mti.Text = "Tiện ích";
            // 
            // skinsRibbonPageGroup
            // 
            this.skinsRibbonPageGroup.ItemLinks.Add(this.rgbiSkins);
            this.skinsRibbonPageGroup.Name = "skinsRibbonPageGroup";
            this.skinsRibbonPageGroup.ShowCaptionButton = false;
            this.skinsRibbonPageGroup.Text = "Giao diện";
            // 
            // ribbonPageGroup1
            // 
            this.ribbonPageGroup1.ItemLinks.Add(this.bbidesignReport);
            this.ribbonPageGroup1.Name = "ribbonPageGroup1";
            this.ribbonPageGroup1.ShowCaptionButton = false;
            // 
            // exitRibbonPageGroup
            // 
            this.exitRibbonPageGroup.ItemLinks.Add(this.iExit);
            this.exitRibbonPageGroup.Name = "exitRibbonPageGroup";
            this.exitRibbonPageGroup.ShowCaptionButton = false;
            // 
            // ribbonPageGroup2
            // 
            this.ribbonPageGroup2.ItemLinks.Add(this.barButtonItem1);
            this.ribbonPageGroup2.ItemLinks.Add(this.barButtonItem3);
            this.ribbonPageGroup2.Name = "ribbonPageGroup2";
            this.ribbonPageGroup2.ShowCaptionButton = false;
            // 
            // ribbonStatusBar
            // 
            this.ribbonStatusBar.ItemLinks.Add(this.siStatus);
            this.ribbonStatusBar.Location = new System.Drawing.Point(0, 668);
            this.ribbonStatusBar.Name = "ribbonStatusBar";
            this.ribbonStatusBar.Ribbon = this.ribbon;
            this.ribbonStatusBar.Size = new System.Drawing.Size(1014, 31);
            // 
            // frmMain
            // 
            this.AllowFormGlass = DevExpress.Utils.DefaultBoolean.False;
            this.ClientSize = new System.Drawing.Size(1014, 699);
            this.Controls.Add(this.splitContainerControl);
            this.Controls.Add(this.ribbon);
            this.Controls.Add(this.popupControlContainer1);
            this.Controls.Add(this.popupControlContainer2);
            this.Controls.Add(this.ribbonStatusBar);
            this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
            this.Name = "frmMain";
            this.Ribbon = this.ribbon;
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
            this.StatusBar = this.ribbonStatusBar;
            this.Text = "Quản lý phòng khám";
            this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.frmMain_FormClosing);
            this.Load += new System.EventHandler(this.frmMain_Load);
            ((System.ComponentModel.ISupportInitialize)(this.splitContainerControl)).EndInit();
            this.splitContainerControl.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.navBarControl)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.tabmain)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.ribbon)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.appMenu)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.popupControlContainer2)).EndInit();
            this.popupControlContainer2.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.buttonEdit.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.popupControlContainer1)).EndInit();
            this.popupControlContainer1.ResumeLayout(false);
            this.popupControlContainer1.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.ribbonImageCollection)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.ribbonImageCollectionLarge)).EndInit();
            this.ResumeLayout(false);

        }

        private void InitSkinGallery()
        {
            UserLookAndFeel.Default.ActiveLookAndFeel.SkinName = this.pStyleLookAndFeel;
            SkinHelper.InitSkinGallery(this.rgbiSkins, true);
        }

        private void M00_01_ItemClick(object sender, ItemClickEventArgs e)
        {
            new frmchondatabase().ShowDialog();
            this._condata = new ConnectDatabase();
        }

        private void M00_02_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!this.f_Check_IsFormOpen("tab_phanquyensudung"))
            {
                UCphanquyensudung uc = new UCphanquyensudung {
                    pCondata = this._condata,
                    pChucNang = this.f_DanhSachPhanQuyen("")
                };
                uc.Show();
                this.f_Add_Form("tab_phanquyensudung", "Ph\x00e2n quyền sử dụng", uc);
            }
        }

        private void M00_03_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!this.f_Check_IsFormOpen("tab_quanlydangnhap"))
            {
                UCquanlydangnhap uc = new UCquanlydangnhap {
                    pCondata = this._condata,
                    pChucNang = this.f_DanhSachPhanQuyen(new dtoDSThongSo().TVQuyenSuDung(1))
                };
                uc.Show();
                this.f_Add_Form("tab_quanlydangnhap", "Quản l\x00fd đăng nhập", uc);
            }
        }

        private void M00_04_ItemClick(object sender, ItemClickEventArgs e)
        {
            UCquanlydangnhap_edit _edit = new UCquanlydangnhap_edit {
                pDoiMatKhau = true
            };
            dtoDMDangNhap nhap = new dtoDMDangNhap(this._condata) {
                ID = this._iUserID
            };
            nhap.Load();
            _edit.pDangNhap = nhap;
            Form form = new Form();
            form.Controls.Add(_edit);
            form.ShowInTaskbar = false;
            form.StartPosition = FormStartPosition.CenterScreen;
            form.ControlBox = false;
            form.Width = _edit.Width + 10;
            form.Height = _edit.Height + 40;
            form.ShowIcon = false;
            form.Text = "Đổi mật khẩu đăng nhập";
            form.ShowDialog();
        }

        private void M01_01_01_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!this.f_Check_IsFormOpen("tab_tiepdon"))
            {
                ucbn_tiepdon uc = new ucbn_tiepdon(new General(this._condata), this._iUserID);
                uc.Show();
                this.f_Add_Form("tab_tiepdon", "Đăng k\x00fd kh\x00e1m bệnh", uc);
            }
        }

        private void M01_01_01_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
        }

        private void M01_01_02_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
        }

        private void M01_01_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!this.f_Check_IsFormOpen("tab_khambenh"))
            {
                ucbn_khambenh uc = new ucbn_khambenh(this._iUserID);
                uc.Show();
                this.f_Add_Form("tab_khambenh", "Kh\x00e1m bệnh", uc);
            }
        }

        private void M01_02_01_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!this.f_Check_IsFormOpen("tab_ucbn_bc_dsdangkykb"))
            {
                ucbn_bc_dsdangkykb uc = new ucbn_bc_dsdangkykb(this._iUserID);
                uc.Show();
                this.f_Add_Form("tab_ucbn_bc_dsdangkykb", "Danh s\x00e1ch đăng k\x00fd kh\x00e1m bệnh", uc);
            }
        }

        private void M01_03_01_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!this.f_Check_IsFormOpen("tab_ucbn_dmbenhtat"))
            {
                ucbn_dmbenhtat uc = new ucbn_dmbenhtat();
                uc.Show();
                this.f_Add_Form("tab_ucbn_dmbenhtat", "Danh mục bệnh tật", uc);
            }
        }

        private void M01_03_02_01_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!this.f_Check_IsFormOpen("tab_ucch_dmtinhthanh"))
            {
                ucch_dmtinhthanh uc = new ucch_dmtinhthanh();
                uc.Show();
                this.f_Add_Form("tab_ucch_dmtinhthanh", "Danh mục tỉnh th\x00e0nh", uc);
            }
        }

        private void M01_03_02_02_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!this.f_Check_IsFormOpen("tab_ucch_dmquanhuyen"))
            {
                ucch_dmquanhuyen uc = new ucch_dmquanhuyen();
                uc.Show();
                this.f_Add_Form("tab_ucch_dmquanhuyen", "Danh mục quận huyện", uc);
            }
        }

        private void M01_03_02_03_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!this.f_Check_IsFormOpen("tab_ucch_dmphuongxa"))
            {
                ucch_dmphuongxa uc = new ucch_dmphuongxa();
                uc.Show();
                this.f_Add_Form("tab_ucch_dmphuongxa", "Danh mục x\x00e3 phường", uc);
            }
        }

        private void M01_03_02_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!this.f_Check_IsFormOpen("tab_ucbn_dmbacsi"))
            {
                ucbn_dmbacsi uc = new ucbn_dmbacsi();
                uc.Show();
                this.f_Add_Form("tab_ucbn_dmbacsi", "Danh mục b\x00e1c sĩ", uc);
            }
        }

        private void M01_03_03_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!this.f_Check_IsFormOpen("tab_ucbn_dmkhoaphong"))
            {
                ucbn_dmkhoaphong uc = new ucbn_dmkhoaphong();
                uc.Show();
                this.f_Add_Form("tab_ucbn_dmkhoaphong", "Danh mục khoa ph\x00f2ng", uc);
            }
        }

        private void M01_03_03_ItemClick_1(object sender, ItemClickEventArgs e)
        {
            ucbn_thongso _thongso = new ucbn_thongso();
            Form form = new Form();
            form.Controls.Add(_thongso);
            form.ShowInTaskbar = false;
            form.StartPosition = FormStartPosition.CenterScreen;
            form.ControlBox = false;
            form.Width = _thongso.Width + 10;
            form.Height = _thongso.Height + 40;
            form.ShowIcon = false;
            form.Text = "Th\x00f4ng số kh\x00e1m bệnh";
            form.ShowDialog();
        }

        private void M01_04_01_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!this.f_Check_IsFormOpen("tab_ucbn_thongtinbn"))
            {
                ucbn_thongtinbn uc = new ucbn_thongtinbn();
                uc.Show();
                this.f_Add_Form("tab_ucbn_thongtinbn", "Sửa th\x00f4ng tin bệnh nh\x00e2n", uc);
            }
        }

        private void M02_01_02_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!this.f_Check_IsFormOpen("tab_ucvp_thanhtoanvienphi"))
            {
                int pIDQuyenSo = 0;
                if (new VPThongSo(this._condata).pVP_A1_QuanLyQuyenSo)
                {
                    ucvp_chonquyenso _chonquyenso = new ucvp_chonquyenso();
                    Form form = new Form();
                    form.Controls.Add(_chonquyenso);
                    form.ShowInTaskbar = false;
                    form.StartPosition = FormStartPosition.CenterScreen;
                    form.ControlBox = false;
                    form.Width = _chonquyenso.Width + 10;
                    form.Height = _chonquyenso.Height + 40;
                    form.ShowIcon = false;
                    form.Text = "Chọn quyển sổ";
                    form.ShowDialog();
                    pIDQuyenSo = _chonquyenso.pIDQuyenSo;
                    if (pIDQuyenSo == 0)
                    {
                        return;
                    }
                }
                ucvp_thanhtoanvienphi uc = new ucvp_thanhtoanvienphi(this._iUserID) {
                    pIDQuyenSo = pIDQuyenSo
                };
                uc.Show();
                this.f_Add_Form("tab_ucvp_thanhtoanvienphi", "Thanh to\x00e1n viện ph\x00ed", uc);
            }
        }

        private void M02_01_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!this.f_Check_IsFormOpen("tab_ucvp_thutien"))
            {
                ucvp_thutien uc = new ucvp_thutien(this._iUserID);
                uc.Show();
                this.f_Add_Form("tab_ucvp_thutien", "Thu tiền", uc);
            }
        }

        private void M02_02_01_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!this.f_Check_IsFormOpen("tab_ucvp_bc_doanthu"))
            {
                ucvp_bc_doanthu uc = new ucvp_bc_doanthu();
                uc.Show();
                this.f_Add_Form("tab_ucvp_bc_doanthu", "B\x00e1o c\x00e1o doanh thu", uc);
            }
        }

        private void M02_03_01_LinkClicked(object sender, NavBarLinkEventArgs e)
        {
            if (!this.f_Check_IsFormOpen("tab_dmvp"))
            {
                ucvp_dmvp uc = new ucvp_dmvp();
                uc.Show();
                this.f_Add_Form("tab_dmvp", "Danh mục gi\x00e1 viện ph\x00ed", uc);
            }
        }

        private void M02_03_02_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!this.f_Check_IsFormOpen("tab_dmvp"))
            {
                ucvp_dmvp uc = new ucvp_dmvp();
                uc.Show();
                this.f_Add_Form("tab_dmvp", "Danh mục gi\x00e1 viện ph\x00ed", uc);
            }
        }

        private void M02_03_02_ItemClick_1(object sender, ItemClickEventArgs e)
        {
            ucvp_thongso _thongso = new ucvp_thongso();
            Form form = new Form();
            form.Controls.Add(_thongso);
            form.ShowInTaskbar = false;
            form.StartPosition = FormStartPosition.CenterScreen;
            form.ControlBox = false;
            form.Width = _thongso.Width + 10;
            form.Height = _thongso.Height + 40;
            form.ShowIcon = false;
            form.Text = "Th\x00f4ng số thu ph\x00ed";
            form.ShowDialog();
        }

        private void M02_03_04_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!this.f_Check_IsFormOpen("tab_ucvp_dmquyenso"))
            {
                ucvp_dmquyenso uc = new ucvp_dmquyenso(this._condata, this._iUserID);
                uc.Show();
                this.f_Add_Form("tab_ucvp_dmquyenso", "Danh mục quyển sổ", uc);
            }
        }

        private void M02_03_ItemClick(object sender, ItemClickEventArgs e)
        {
            this.f_load_barcontrol("navM02_03");
        }

        private void M03_01_01_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!this.f_Check_IsFormOpen("tab_nhapkho"))
            {
                ucd_nhapkho uc = new ucd_nhapkho(this._iUserID);
                uc.Show();
                this.f_Add_Form("tab_nhapkho", "Nhập kho", uc);
            }
        }

        private void M03_01_02_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!this.f_Check_IsFormOpen("tab_ucd_phieudathang"))
            {
                ucd_phieudathang uc = new ucd_phieudathang();
                uc.Show();
                this.f_Add_Form("tab_ucd_phieudathang", "Phiếu đặt h\x00e0ng", uc);
            }
        }

        private void M03_01_03_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!this.f_Check_IsFormOpen("tab_ucd_khaibaotonkho"))
            {
                ucd_khaibaotonkho uc = new ucd_khaibaotonkho(this._iUserID);
                uc.Show();
                this.f_Add_Form("tab_ucd_khaibaotonkho", "Danh mục quyển sổ", uc);
            }
        }

        private void M03_02_02_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!this.f_Check_IsFormOpen("tab_ucd_xuatkho_banle"))
            {
                ucd_xuatkho_banle_ds uc = new ucd_xuatkho_banle_ds(this._iUserID);
                uc.Show();
                this.f_Add_Form("tab_ucd_xuatkho_banle", "Xuất b\x00e1n lẻ", uc);
            }
        }

        private void M03_02_03_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!this.f_Check_IsFormOpen("tab_ucd_xuatkho_banle_kkedon_ds"))
            {
                ucd_xuatkho_banle_kkedon_ds uc = new ucd_xuatkho_banle_kkedon_ds(this._iUserID);
                uc.Show();
                this.f_Add_Form("tab_ucd_xuatkho_banle_kkedon_ds", "Xuất b\x00e1n kh\x00f4ng k\x00ea đơn", uc);
            }
        }

        private void M03_03_01_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!this.f_Check_IsFormOpen("tab_ucd_bc_nhapkhochitiet"))
            {
                ucd_bc_nhapkhochitiet uc = new ucd_bc_nhapkhochitiet();
                uc.Show();
                this.f_Add_Form("tab_ucd_bc_nhapkhochitiet", "B\x00e1o c\x00e1o sổ nhập kho chi tiết", uc);
            }
        }

        private void M03_03_03_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!this.f_Check_IsFormOpen("tab_ucd_bc_tonkhochitiet"))
            {
                ucd_bc_tonkhochitiet uc = new ucd_bc_tonkhochitiet();
                uc.Show();
                this.f_Add_Form("tab_ucd_bc_tonkhochitiet", "B\x00e1o c\x00e1o tồn kho chi tiết", uc);
            }
        }

        private void M03_03_04_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!this.f_Check_IsFormOpen("tab_ucd_bc_nhapxuatton"))
            {
                ucd_bc_nhapxuatton uc = new ucd_bc_nhapxuatton(this._condata);
                uc.Show();
                this.f_Add_Form("tab_ucd_bc_nhapxuatton", "B\x00e1o c\x00e1o nhập xuất tồn", uc);
            }
        }

        private void M03_04_01_06_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!this.f_Check_IsFormOpen("tab_ucd_dmcachdung"))
            {
                ucd_dmcachdung uc = new ucd_dmcachdung(this._condata, this._iUserID);
                uc.Show();
                this.f_Add_Form("tab_ucd_dmcachdung", "Danh mục c\x00e1ch d\x00f9ng", uc);
            }
        }

        private void M03_04_01_07_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!this.f_Check_IsFormOpen("tab_ucd_dmhangsanxuat"))
            {
                ucd_dmhangsanxuat uc = new ucd_dmhangsanxuat();
                uc.Show();
                this.f_Add_Form("tab_ucd_dmhangsanxuat", "Danh mục nh\x00e0 sản xuất", uc);
            }
        }

        private void M03_04_01_08_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!this.f_Check_IsFormOpen("tab_ucd_dmnhomduocpham"))
            {
                ucd_dmnhomduocpham uc = new ucd_dmnhomduocpham();
                uc.Show();
                this.f_Add_Form("tab_ucd_dmnhomduocpham", "Danh mục nh\x00f3m dược phẩm", uc);
            }
        }

        private void M03_04_01_09_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!this.f_Check_IsFormOpen("tab_ucd_dmloaiduocpham"))
            {
                ucd_dmloaiduocpham uc = new ucd_dmloaiduocpham();
                uc.Show();
                this.f_Add_Form("tab_ucd_dmloaiduocpham", "Danh mục loại dược phẩm", uc);
            }
        }

        private void M03_04_01_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!this.f_Check_IsFormOpen("tab_ucd_dmduocpham"))
            {
                ucd_dmduocpham uc = new ucd_dmduocpham(this._condata);
                uc.Show();
                this.f_Add_Form("tab_ucd_dmduocpham", "Danh mục dược phẩm", uc);
            }
        }

        private void M03_04_02_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!this.f_Check_IsFormOpen("tab_ucd_dmnhacungcap"))
            {
                ucd_dmnhacungcap uc = new ucd_dmnhacungcap(this._condata);
                uc.Show();
                this.f_Add_Form("tab_ucd_dmnhacungcap", "Danh mục nh\x00e0 cung cấp", uc);
            }
        }

        private void M03_04_03_ItemClick(object sender, ItemClickEventArgs e)
        {
            ucd_thongso _thongso = new ucd_thongso();
            Form form = new Form();
            form.Controls.Add(_thongso);
            form.ShowInTaskbar = false;
            form.StartPosition = FormStartPosition.CenterScreen;
            form.ControlBox = false;
            form.Width = _thongso.Width + 10;
            form.Height = _thongso.Height + 40;
            form.ShowIcon = false;
            form.Text = "Th\x00f4ng số dược";
            form.ShowDialog();
        }

        private void M03_04_04_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!this.f_Check_IsFormOpen("tab_ucd_dmvitrikho"))
            {
                ucd_dmvitrikho uc = new ucd_dmvitrikho(this._condata);
                uc.Show();
                this.f_Add_Form("tab_ucd_dmvitrikho", "Vị tr\x00ed trong kho", uc);
            }
        }

        private void M03_04_05_ItemClick(object sender, ItemClickEventArgs e)
        {
            if (!this.f_Check_IsFormOpen("tab_ucd_dmquydoi"))
            {
                ucd_dmquydoi uc = new ucd_dmquydoi(this._condata);
                uc.Show();
                this.f_Add_Form("tab_ucd_dmquydoi", "Quy đổi", uc);
            }
        }

        private void tabmain_CloseButtonClick(object sender, EventArgs e)
        {
            XtraTabControl control = sender as XtraTabControl;
            ClosePageButtonEventArgs args = e as ClosePageButtonEventArgs;
            (args.Page as XtraTabPage).Dispose();
        }

        private void tabmain_ControlAdded(object sender, ControlEventArgs e)
        {
            this.tabmain_ControlRemoved(null, null);
        }

        private void tabmain_ControlRemoved(object sender, ControlEventArgs e)
        {
            if (this.tabmain.TabPages.Count == 0)
            {
                this.tabmain.Visible = false;
            }
            else
            {
                this.tabmain.Visible = true;
                this.tabmain.BringToFront();
            }
        }

        private void tabmain_SelectedPageChanged(object sender, TabPageChangedEventArgs e)
        {
            base.ActiveControl = e.Page;
        }

        private string pStyleLookAndFeel
        {
            get
            {
                DataSet set = new DataSet();
                try
                {
                    set.ReadXml(Environment.CurrentDirectory + "//xml//styleform.xml", XmlReadMode.ReadSchema);
                    return set.Tables[0].Rows[0][0].ToString();
                }
                catch
                {
                    return "DevExpress Style";
                }
            }
            set
            {
                DataSet set = new DataSet();
                try
                {
                    set.ReadXml(Environment.CurrentDirectory + "//xml//styleform.xml", XmlReadMode.ReadSchema);
                }
                catch
                {
                    set = new DataSet();
                    set.Tables.Add("style");
                    set.Tables[0].Columns.Add("name");
                    DataRow row = set.Tables[0].NewRow();
                    set.Tables[0].Rows.Add(row);
                }
                set.Tables[0].Rows[0][0] = value;
                set.WriteXml(Environment.CurrentDirectory + "//xml//styleform.xml", XmlWriteMode.WriteSchema);
            }
        }
    }
}

